class Person{
    constructor(name, age) {
        this._name = name
        this._age = age
    }

    setName(nName) {
        this._name = nName
    }

    getName () {
        return this._name
    }

    printInfo () {
        console.log(this._name, this._age)
    }

    static say () {
        console.log('what ???')
    }
    
}

let p = new Person('zhangsan', 20)
Person.say()

// console.log(p.getName())
// p.setName('lisi')
// console.log(p.getName())

// class Child extends Person{
//     constructor(name, age, sex) {
//         super(name, age)
//         this.sex = sex
//     }
// }
// let c = new Child('wangwu', 20, 'male')
// console.log(c.getName())
// c.setName('hahah')
// console.log(p.getName())
// console.log(c.getName())
// c.printInfo()
// p.printInfo()